<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
	function dosubmit() {
		if (document.all("name").value == "") {
			alert("用户名不能为空");
			document.all("name").focus();
			return false;
		}
		if (document.all("password").value == "") {
			alert("密码不能为空");
			document.all("password").focus();
			return false;
		}

		return true;
	}
</script>

</head>
<%
	//获取项目绝对路径 如： http://ip:port/projectName/
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<body>
	<form action="<%=request.getContextPath()%>/login.action" method="post">
		<h2>用户登录</h2>
		用户: 
		<input type="text" name="user.name" id="name" value="1"> <br>
		<br> 
		密码:<input type="password" name="user.password" id="password" value="1">
		<br> 
		<input type="submit"  value=" 登  录  " onclick="return dosubmit();">


	</form>
</body>
</html>